export default ({app,store,route,redirect,params,query,req,res}) => {
  console.log('插件');
  //app = vue实例
  app.router.beforeEach((to,from,next)=>{
    //全局前置守卫，插件
    //next（true/false)
    // console.log('插件配置全局前置',to);
    // if(to.name == 'login' || to.name == 'reg'){
    //   next()
    // }else{
    //   redirect({name:'login'})
    // }
    next()
  })

  app.router.afterEach((to,from)=>{
    console.log('插件全局后置守卫');
  })
}